package fr.upmc.mdoc.tp1.models;

import java.util.HashSet;
import java.util.Set;

public class Contact {

	private long contactId = -1;
	private String firstName, lastName, email;
	private Address address;
	private Set<PhoneNumber> phones;
	private Set<ContactGroup> books;

	public Contact() {
		this("Reda", "Bendraou", "reda.bendraou@lip6.fr");
	}

	public Contact(String firstName, String lastName, String email) {
		this.firstName = firstName;
		this.lastName = lastName;
		this.email = email;
		phones = new HashSet<PhoneNumber>();
		books = new HashSet<ContactGroup>();
	}

	public long getContactId() {
		return contactId;
	}

	public void setContactId(long contactId) {
		this.contactId = contactId;
	}

	public String getEmail() {
		return email;
	}

	public Address getAddress() {
		return address;
	}

	public void setAddress(Address address) {
		this.address = address;
	}

	public String getFirstName() {
		return firstName;
	}

	public void setFirstName(String firstName) {
		this.firstName = firstName;
	}

	public String getLastName() {
		return lastName;
	}

	public void setLastName(String lastName) {
		this.lastName = lastName;
	}

	public void setEmail(String email) {
		this.email = email;
	}

	public Set<PhoneNumber> getPhones() {
		return phones;
	}

	public void setPhones(Set<PhoneNumber> phones) {
		this.phones = phones;
	}

	public Set<ContactGroup> getBooks() {
		return books;
	}

	public void setBooks(Set<ContactGroup> books) {
		this.books = books;
	}

	public String toString() {
		return lastName + " " + firstName + " (" + email + ") " + address;
	}

}
